from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response


class MyPageNumberPagination(PageNumberPagination):
    page_size = 100 # 每页显示的数量
    page_size_query_param = 'page_size' # 在URL中添加 ?page_size=<value> 来指定每页的数量
    max_page_size = 2000 # 每页最大允许的数量